package com.heima.admin.service.Impl;

import com.heima.api.admin.IWmNewsClient;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsReviewDto;
import com.heima.admin.service.ReviewScanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class ReviewScanServiceImpl implements ReviewScanService {
    @Autowired
    private IWmNewsClient wmNewsClient;

    /**
     * 文章列表
     * @param reviewDto
     * @return
     */
    @Override
    public PageResponseResult listVoReview(WmNewsReviewDto reviewDto) {
        PageResponseResult result = wmNewsClient.listVo(reviewDto);
        return result;
    }

    /**
     * 文章详情
     */
    @Override
    public ResponseResult WmNewById(Integer id) {
        return wmNewsClient.WmNewById(id);
    }

    /**
     * 审核失败
     * @param reviewDto
     * @return
     */
    @Override
    public ResponseResult authFail(WmNewsReviewDto reviewDto) {
        return wmNewsClient.authFail(reviewDto);
    }

    /**
     * 审核成功
     * @param reviewDto
     * @return
     */
    @Override
    public ResponseResult authPass(WmNewsReviewDto reviewDto) {
        return wmNewsClient.authPass(reviewDto);
    }
}
